<template>
	<view class="active_form"  :class="{'required':required,'error':error,'isPad':isPad}"  >
		<slot />
		<!-- <view class="active_tit">
			<view class="tit">
				基本信息
			</view> 
			<view class="add">
				＋
			</view>
		</view>
		
		<view class="active_form">
			<view class="active_label">
				姓名：
			</view>
			<view class="active_input">
				<input type="text" v-model="form.name" />
			</view>
		</view>
		<view class="active_form">
			<view class="active_label">
				经营类型：
			</view>
			<view class="active_input">
				<radio-group @change="((o)=>{form.checked=o.detail.value})">
					<label class="radio">
						<radio value="2" :checked="1 === form.checked" />企业</label>
					<label class="radio">
						<radio value="1" :checked="2 === form.checked" />个人</label>
				</radio-group>
			</view>
		</view>
		<view class="active_form">
			<view class="active_label">
				普通选择：
			</view>
			<view class="active_input">
				<SelectPicker v-model="form.corCerttype" :options="corCerttypeOptions" placeholder="请选择企业证件类型" />
			</view>
		</view>
		<view class="active_form">
			<view class="active_label">
				地址选择：
			</view>
			<view class="active_input">
				<RegionPicker :value="[province,city,county]" :label="form.areaValue" :options="region"   class="uni-form-content" />
			</view>
		</view> -->
		
	</view>
</template>

<script>
	import SelectPicker from "../SelectPicker";
	import RegionPicker from "../RegionPicker";
	import region from './areaList.js'
	export default {
		name: 'activeForm',
		data() {
			return {
				error:false,
				isPad:false,
				region,
				province: "",
				city: "",
				county: "",
				index: 1,
				form: {
					corCerttype: '',
					checked:''
				},
				corCerttypeOptions: [{
						label: "营业执照",
						value: "1",
					},
					{
						label: "个体工商户",
						value: "2",
					},
				],
			}
		},
		props:{
			required: {
			  type: Boolean,
			  default: false,
			},
		},
		components: {
			SelectPicker,
			RegionPicker

		},
		mounted() {
			this.isPad = getApp().globalData.isPad
		},
		methods:{
			requiredFn(flag){
				this.error = flag
			}
		}
	}
</script>

<style lang="scss">
	
	
</style>
